Total Complexity | 22 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | // # spell-checker:ignore UserProfile HomeDrive HomePath WinDir |
||
82 | class _OSPaths { |
||
83 | constructor() { |
||
84 | const OSPaths = function () { |
||
85 | return new _OSPaths(); |
||
86 | }; |
||
87 | |||
88 | this._fn = OSPaths; |
||
89 | |||
90 | // Connect to platform-specific API functions by extension |
||
91 | const extension = isWinOS ? windows() : base(); |
||
92 | Object.keys(extension).forEach(key => { |
||
93 | this._fn[key] = extension[key]; |
||
94 | }); |
||
95 | |||
96 | return this._fn; |
||
|
|||
97 | } |
||
98 | } |
||
99 | |||
101 |